function requestinfo(needdata) {
	wx.request({
		url: needdata.baseUrl + needdata.url,
		data: {
			pageindex: needdata.pageIndex,
			type: needdata.type,
			Uid: needdata.Uid,
			sectype: needdata.sectype
		},
		method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
		// header: {}, // 设置请求的 header
		success: function (res) {
			// success
			if (res.data.code == 200) {
				if (needdata.ifnew) {
					needdata.this.setData({
						comment: res.data.data
					});
				} else {
					needdata.this.setData({
						comment:needdata.comment.concat(res.data.data)
					});
					
				}
			}
			if (res.data.data && res.data.data.length < 5) {
				needdata.this.setData({
					reachbottom :true
				});
			} else if(res.data.data && res.data.data.length == 5){
				needdata.this.setData({
					reachbottom :false
				});
			} else {
				
			}
			needdata.callback();
		},
		fail: function () {
			// fail
		},
		complete: function () {
			// complete
		}
	});
}


module.exports.requestinfo = requestinfo;
